package io1;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class CopyDemo2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("qq.jpg.JPG");
        FileOutputStream fos=new FileOutputStream("qq.jpg-cp2.JPG");
        long len=System.currentTimeMillis();
        byte[] stsa=new byte[1024*10];
        int a;
        while ((a=fis.read(stsa))!=-1){
            fos.write(stsa);
        }
        long ltt=System.currentTimeMillis();
        System.out.println("复制完毕"+(ltt-len)+"ms");
        fis.close();
        fos.close();
    }
}
